
<!-- END OF BANNER -->











<?php if($post['details']){?>
<div class="listing">
<?php foreach($post['details'] as $post):?>

	<?php 
	
	$c = $this->term_model->getTermValue($post->id,'city',1);
	
	if($c){
	
		$loc = getPK('location',$c);
	
	
	
		//var_dump($loc);die();
		//die("YES");
		$loc = seoUrl($loc['name']);
	}else{
	
		$loc =  config_item('country');
	
		$loc = seoUrl($loc);
	}
	/*$loc = getPK('location',$this->term_model->getTermValue($post->id,'city',1));
	
//	var_dump($loc);die();
	
	$loc = seoUrl($loc['name']);
*/

	$cat = getPK('category',$this->term_model->getTermValue($post->id,'category',1));
	$cat = seoUrl($cat['name']);
	
	$photo = $this->gallery_model->getGallery($post->id,'photo',1);
	$video = $this->gallery_model->getGallery($post->id,'video',1);
	
	
	?>
	<div class="panel">
		<div class="panel-head clearfix">
			<div class="col-xs-1">
				<i class="fa fa-map-marker fa-3x "></i>
			</div>
			<div class="col-xs-9">

				<h2>
					<a
						href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>"><strong
						class="text-danger"><?= $post->title; ?> </strong> </a>
				</h2>
				<h3>
				
					<?= $this->category_model->getCategoryHTML($post->id); ?>
 
				</h3>
			</div>
			<div class="col-xs-2 text-right">
				<a href="#"><i class="fa fa-2x fa-sign-out text-emboss"></i> </a>
			</div>
		</div>



		<div class="panel-body clearfix">
			<div class="col-xs-6 col-md-3">
				<a href="#"> <img class="thumbnail img-responsive"
					src="http://i.ytimg.com/vi/uGBKzIY4mpc/0.jpg"
					alt="<?= $post->title; ?>">
				</a>
			</div>
			<div class="col-lg-8">
				<p id="address">
					<?= $post->address1;?>
					<strong><?= $this->location_model->getLocationHTML($post->id); ?> </strong>
				</p>

				<p><?= $post->description;?></p>


				<p id="description">
				<?php if($post->phone1){?>
					<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" class="m-right-20"><i class="fa fa-lg fa-phone"></i>&nbsp;
						Call Us</a> <?php }?>
						<?php if($post->website){?>
						<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" class="m-right-20"><i
						class="fa fa-lg fa-globe"></i>&nbsp; Website</a><?php }?>
						<?php if($post->email){?>
						 <a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>"
						class="m-right-20"><i class="fa fa-lg fa-envelope"></i>&nbsp;
						Email</a>
						<?php }?>
				</p>
			</div>

			<div class="col-lg-1 text-right ">
			<?php if($video){?>
				<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" title="Video"><i
					class="fa fa-lg pull-right fa-border fa-film text-emboss m-bot-35"></i>
				</a> 
				<?php }?>
				<?php if($photo){?>
				<a href="<?= base_url().$loc."/".$cat."/".$post->slug."-".$post->id; ?>" title="Photo"> <i
					class="fa fa-lg pull-right fa-border fa-camera text-emboss m-bot-35"></i>
				</a>
				<?php }?>
			</div>
		</div>
	</div>
	<?php endforeach;?>
</div>
<?php }else{?>


<div class="alert alert-danger">Opps! No data found...</div>

<?php }?>
<!-- END OF LISTING -->

<ul class="pagination pull-right">
  <li><?php  echo $this->pagination->create_links(); ?></li>
  
</ul>





